#include "common.h"

extern _RegSet* do_syscall(_RegSet* r);
static _RegSet* do_event(_Event e, _RegSet* r) {
  switch (e.event) {
  case _EVENT_SYSCALL:
    do_syscall(r);
    return schedule(r);
  case _EVENT_TRAP:
    //Log("event: _EVENT_TRAP");
    return schedule(r);
  case _EVENT_IRQ_TIME:
    //Log("event: _EVENT_IRQ_TIME");
    return schedule(r);
  default:
    panic("Unhandled event ID = %d", e.event);
  }

  return NULL;
}s

void init_irq(void) {
  _asye_init();
}
